<!-- 证书信息 -->
<template>
  <div>
    <div>
      <div class="header">
        <div class="bread"></div>
        <div class="ipt">
          <el-input
            v-model="queryParams.searchValue"
            placeholder="请输入证书名称/持有人"
            size="normal"
            clearable
            class="ipt-el"
          ></el-input>
          <el-button type="primary" size="default" @click="handleQuery">
            搜索
          </el-button>
        </div>
        <div class="btn">
          <div>
            <el-button
              size="default"
              @click="handleAdd"
              style="margin-right: 10px; background-color: #ff6a00; color: #fff"
            >
              <span>+</span> 新建证书
            </el-button>
            <el-dropdown>
              <el-button class="el-icon-more"></el-button>
              <el-dropdown-menu slot="dropdown"> </el-dropdown-menu>
            </el-dropdown>
          </div>
        </div>
      </div>
      <div class="chooise">
        <template>
          <span>场景：</span>
          <el-select
            v-model="value"
            ref="sel"
            clearable
            @visible-change="
              (v) => visibleChange(v, 'sel', createScene, configScene)
            "
            class="sel-sence"
            @change="querySceneList"
            style="margin-right: 10px"
          >
            <el-option
              v-for="item in sceneOptions"
              :key="item.sceneId"
              :label="item.name"
              :value="item.sceneId"
            >
            </el-option>
          </el-select>
          <el-button
            type="primary"
            icon="iconfont icon-shaixuan"
            size="default"
            @click="createScene"
          >
            高级筛选
          </el-button>
        </template>
      </div>
      <div v-if="scenArr !== []" class="scenF">
        <div
          v-for="(item, index) in scenArr"
          :key="index"
          class="scenF-content"
        >
          <div class="scenF-detail" @click="scenSearch(item.sceneId)">
            {{ item.sceneList }}
            <i
              class="el-icon-circle-close"
              @click.stop="scenDel(index)"
              style="margin-left: 10px"
            ></i>
          </div>
        </div>
      </div>

      <el-table
        v-loading="loading"
        :data="certInfoList"
        @selection-change="handleSelectionChange"
      >
        <template slot="empty" class="emptyBg">
          <img src="@/assets/images/empty.jpg" alt="" />
        </template>
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="证书名称" align="center" prop="certTypeId">
          <template slot-scope="scope">
            {{ scope.row.certType.certName }}
          </template>
        </el-table-column>
        <el-table-column label="持有人" align="center" prop="belongerName" />
        <el-table-column label="身份证号" align="center" prop="idCard" />
        <el-table-column label="手机号" align="center" prop="phone" />
        <el-table-column label="证书主图" align="center" prop="remark">
          <template slot-scope="scope">
            <el-image
              style="width: 100%"
              :src="scope.row.remark"
              :preview-src-list="[scope.row.remark]"
            ></el-image>
          </template>
        </el-table-column>
        <el-table-column
          label="有效期"
          align="center"
          prop="certValidity"
          width="180"
        >
          <template slot-scope="scope">
            <span>{{
              scope.row.foreverValidity == "Y"
                ? "永久有效"
                : parseTime(scope.row.certValidity, "{y}-{m}-{d}")
            }}</span>
          </template>
        </el-table-column>
        <el-table-column label="状态" align="center" prop="certNumber">
          <template slot-scope="scope">
            {{
              scope.row.foreverValidity == "Y"
                ? "正常"
                : compareDate(scope.row.certValidity)
                ? "正常"
                : "已过期"
            }}
          </template>
        </el-table-column>
        <el-table-column label="借用状态" align="center" prop="certNumber">
          <template slot-scope="scope">
            {{ scope.row.loan == "Y" ? "借用" : "正常" }}
          </template>
        </el-table-column>
        <el-table-column label="借用人" align="center" prop="certNumber">
          <template slot-scope="scope">
            {{
              scope.row.loan == "Y" && scope.row.certUse
                ? scope.row.certUse.useUser
                : ""
            }}
          </template>
        </el-table-column>
        <el-table-column label="负责人" align="center" prop="directorName" />
        <el-table-column
          label="更新时间"
          align="center"
          prop="updateTime"
          width="180"
        />
        <el-table-column label="创建人" align="center" prop="createBy" />
        <el-table-column
          label="创建时间"
          align="center"
          prop="createTime"
          width="180"
        />
      </el-table>

      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />

      <!-- 添加或修改证书信息对话框 -->
      <el-dialog
        title="新建证书"
        width="53%"
        custom-class="dialogClass"
        :visible.sync="open"
        append-to-body
      >
        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="证书" prop="certTypeId">
                <treeselect
                  :disable-branch-nodes="true"
                  v-model="form.certTypeId"
                  :options="certTypeTreeData"
                  :show-count="true"
                  placeholder="请选择证书类型"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="持有人" prop="belonger">
                <el-select
                  v-model="form.belonger"
                  placeholder="请选择持有人"
                  clearable
                  filterable
                  style="width: 100%"
                >
                  <el-option
                    v-for="item in belongerList"
                    :key="item.userId"
                    :label="item.nickName"
                    :value="Number(item.userId)"
                  >
                  </el-option>
                </el-select>
                <!--              <el-input v-model="form.belonger" placeholder="请输入持有人"/>-->
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="身份证号" prop="idCard">
                <el-input v-model="form.idCard" placeholder="请输入身份证号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="手机号" prop="phone">
                <el-input v-model="form.phone" placeholder="请输入手机号" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="证书编号" prop="certNumber">
                <el-input
                  v-model="form.certNumber"
                  placeholder="请输入证书编号"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="考试地点" prop="testPlace">
                <el-input
                  v-model="form.testPlace"
                  placeholder="请输入考试地点"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="发证时间" prop="issueDate">
                <el-date-picker
                  clearable
                  style="width: 100%"
                  v-model="form.issueDate"
                  type="date"
                  value-format="yyyy-MM-dd"
                  placeholder="选择发证时间"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="准考证号" prop="admissionTicket">
                <el-input
                  v-model="form.admissionTicket"
                  placeholder="请输入准考证号"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="发证单位" prop="issueUnit">
                <el-input
                  v-model="form.issueUnit"
                  placeholder="请输入发证单位"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="证书所在地" prop="certLocation">
                <el-input
                  v-model="form.certLocation"
                  placeholder="请输入证书所在地"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item
                label="有效期"
                prop="certValidity"
                v-if="!form.foreverValidity"
              >
                <el-date-picker
                  clearable
                  style="width: 100%"
                  v-model="form.certValidity"
                  type="date"
                  value-format="yyyy-MM-dd"
                  placeholder="选择有效期"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="永久有效" prop="foreverValidity">
                <el-checkbox v-model="form.foreverValidity"></el-checkbox>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="主图" prop="remark">
              <el-upload
                ref="upload"
                :on-success="handleFileSuccess"
                list-type="picture-card"
                accept="image/jpeg,image/png"
                :headers="upload.headers"
                :disabled="upload.isUploading"
                :before-upload="beforeUpload"
                :action="upload.url"
                :file-list="fileList"
                :limit="1"
                :auto-upload="true"
                :class="{ disabled: fileList.length > 0 }"
              >
                <i class="el-icon-plus"></i>
              </el-upload>
              <span class="suggest">图片建议上传：jpg/png，最多上传一张</span>
            </el-form-item>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="cancel">取 消</el-button>
          <el-button type="primary" @click="submitForm">确 定</el-button>
        </div>
      </el-dialog>
      <manage-drawer
        :dialog="dialog"
        :drawerData="form"
        v-if="dialog.dialogShowDrawerEject"
      ></manage-drawer>
      <manage-screen
        :dialog="dialog"
        v-if="dialog.screenEcejt"
        @sceneArr="sceneArr"
      ></manage-screen>
      <drag-table
        :dialog="dialog"
        v-if="dialog.senceAdminEject"
        ref="dragTable"
      ></drag-table>
    </div>
  </div>
</template>

<script>
import {
  getCertInfo,
  delCertInfo,
  addCertInfo,
  updateCertInfo,
  exportCertInfo,
} from "@/api/cert/certInfo";
import { unTrusteeshipList } from "@/api/enCert/certDeposit";
import ManageScreen from "./components/manageScreen.vue";
import manageDrawer from "./components/manageDrawer.vue";
import DragTable from "./components/dragTable.vue";

import { treeselect } from "@/api/cert/certType";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth";
import { queryScene } from "@/api/currency";
import { distriBution } from "@/api/registration";
import Purchase from "@/components/purchase";
export default {
  name: "CertInfo",
  components: {
    manageDrawer,
    Treeselect,
    ManageScreen,
    DragTable,
    Purchase,
  },
  data() {
    let checkMobile = (rule, value, callback) => {
      // 验证手机号的正则表达式
      const regMobile =
        /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
      if (this.isEmpty(value) || regMobile.test(value)) {
        // 合法的手机号
        return callback();
        // 不合法
      } else {
        callback(new Error("请输入合法的手机号"));
      }
    };
    let checkId = (rule, value, callback) => {
      // 验证身份证的正则表达式
      const regId =
        /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;

      if (this.isEmpty(value) || regId.test(value)) {
        // 合法的身份证号
        return callback();
      } else {
        callback(new Error("请输入合法的身份证号码"));
      }
      // 不合法
    };
    return {
      scenArr: [],
      Str: "",
      value: "", //高级筛选
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 证书信息表格数据
      certInfoList: [],
      //持有人
      belongerList: [],
      certTypeTreeData: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        searchValue: null,
        pageNum: 1,
        pageSize: 10,
        certTypeId: null,
        belonger: null,
        idCard: null,
        phone: null,
        certNumber: null,
        testPlace: null,
        issueDate: null,
        admissionTicket: null,
        issueUnit: null,
        certLocation: null,
        certValidity: null,
        foreverValidity: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        phone: [{ required: false, validator: checkMobile, trigger: "blur" }],
        idCard: [{ required: false, validator: checkId, trigger: "blur" }],
        certTypeId: [
          { required: true, message: "请选择证书类型", trigger: "blur" },
        ],
        belonger: [
          { required: true, message: "请输入持有人", trigger: "blur" },
        ],
        certValidity: [
          { required: true, message: "选择有效期", trigger: "blur" },
        ],
        remark: [{ required: true, message: "请上传主图", trigger: "blur" }],
      },
      fileList: [],
      upload: {
        isUploading: false,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/cert/certInfo/upload",
      },
      //场景
      sceneOptions: [],
      dialog: {
        dialogShowDrawer: false,
        dialogShowDrawerEject: false,
        dialogShowChioos: false,
        dialogShowBilling: false,
        dialogScreenVisible: false,
        senceAdmin: false, //场景管理
        senceAdminEject: false,
        screenEcejt: false,
        printShow: false,
        printShowEject: false,
      },
    };
  },
  created() {
    this.getTreeselect();
    this.getList();
    this.getScene();
    this.getBelongerList();
  },
  methods: {
    //todo
    //获取持有人
    getBelongerList() {
      distriBution().then((res) => {
        this.belongerList = res.data;
      });
    },
    //查看
    drawer(row) {
      this.dialog.dialogShowDrawerEject = true;
      this.$nextTick(function () {
        this.dialog.dialogShowDrawer = true;
        this.form = row;
      });
    },
    // 删除临时搜索
    scenDel(i) {
      this.scenArr.splice(i, 1);
      if (this.scenArr.length == 0) {
        this.getList();
      }
    },
    // 点击临时搜索
    scenSearch(id) {
      this.getList(id);
    },
    // 获取数组
    sceneArr(data) {
      this.scenArr.push(data);
    },
    querySceneList() {
      this.getList(this.value);
    },
    // 请求场景
    getScene() {
      queryScene({
        type: 28,
      }).then((res) => {
        if (res.default !== null) {
          res.scenes.unshift(res.default);
          this.sceneOptions = res.scenes;
        } else {
          this.sceneOptions = res.scenes;
        }
      });
    },
    // 场景下拉框按钮
    visibleChange(visible, refName, onClick, onClick2) {
      if (visible) {
        const ref = this.$refs[refName];
        let popper = ref.$refs.popper;
        if (popper.$el) popper = popper.$el;
        if (
          !Array.from(popper.children).some(
            (v) => v.className === "el-cascader-menu__list"
          )
        ) {
          const el = document.createElement("ul");
          el.className = "el-cascader-menu__list";
          el.style =
            "border-top: solid 1px #E4E7ED; padding:0; color: #606266;";
          el.innerHTML = `<li class="el-cascader-node" >
                            <span class="el-cascader-node__label" style="color:#1267FA">新建场景</span>
                            </li>
                        `;
          const el2 = document.createElement("ul");
          el2.className = "el-cascader-menu__list";
          el2.innerHTML = `<li class="el-cascader-node" >
                            <span class="el-cascader-node__label" style="color:#1267FA">管理</span>
                            </li>
                        `;
          popper.appendChild(el);
          popper.appendChild(el2);
          el2.onclick = () => {
            onClick2 && onClick2();
            if (ref.toggleDropDownVisible) {
              ref.toggleDropDownVisible(false);
            } else {
              ref.visible = false;
            }
          };
          el.onclick = () => {
            // 底部按钮的点击事件 点击后想触发的逻辑也可以直接写在这
            onClick && onClick();
            // 以下代码实现点击后弹层隐藏 不需要可以删掉
            if (ref.toggleDropDownVisible) {
              ref.toggleDropDownVisible(false);
            } else {
              ref.visible = false;
            }
          };
        }
      }
    },
    //管理
    configScene() {
      this.dialog.senceAdminEject = true;
      this.$nextTick(function () {
        this.dialog.senceAdmin = true;
      });
    },
    //新建场景
    createScene() {
      this.dialog.screenEcejt = true;
      this.$nextTick(function () {
        this.dialog.dialogScreenVisible = true;
      });
    },
    // 文件上传中处理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    beforeUpload(file) {
      this.compress(file).then((res) => {
        file = res;
      });
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.form.remark = response.data;
      this.fileList = [
        {
          name: "",
          url: this.form.remark,
        },
      ];
    },
    getTreeselect() {
      treeselect().then((response) => {
        this.certTypeTreeData = response.data;
        this.createAllowedTree(this.certTypeTreeData);
      });
    },
    createAllowedTree(treeData) {
      treeData.forEach((item) => {
        if (item.children && item.children.length > 0) {
          this.createAllowedTree(item.children);
        } else {
          if (item.type == "0") {
            item.children = [];
          }
          item.isDisabled = item.type == "0" ? true : false;
        }
      });
    },
    /** 查询证书信息列表 */
    getList(val) {
      this.loading = true;
      unTrusteeshipList({
        pageNum: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize,
        sceneId: val,
        identification: this.queryParams.searchValue,
      }).then((response) => {
        this.certInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        certTypeId: null,
        belonger: null,
        idCard: null,
        phone: null,
        certNumber: null,
        testPlace: null,
        issueDate: null,
        admissionTicket: null,
        issueUnit: null,
        certLocation: null,
        certValidity: null,
        foreverValidity: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.Str = "";
      selection.forEach((item) => {
        console.log(item);
        this.Str += item.certType.certName + ",";
      });
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.fileList = [];
      this.reset();
      this.open = true;
      this.title = "添加证书信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getCertInfo(id).then((response) => {
        this.form = response.data;
        this.form.foreverValidity =
          response.data.foreverValidity == "Y" ? true : false;
        this.fileList = [
          {
            name: "",
            url: this.form.remark,
          },
        ];
        this.open = true;
        this.title = "修改证书信息";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          let _form = JSON.parse(JSON.stringify(this.form));
          _form.foreverValidity = _form.foreverValidity ? "Y" : "N";
          _form.belongerName = this.belongerList.find(
            (item) => item.userId == this.form.belonger
          ).nickName;
          if (_form.id != null) {
            updateCertInfo(_form).then((response) => {
              if (response.code === 200) {
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              }
            });
          } else {
            addCertInfo(_form).then((response) => {
              if (response.code === 200) {
                this.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              }
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          return delCertInfo(ids);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(function () {});
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm("是否确认导出所有证书信息数据项?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          return exportCertInfo(queryParams);
        })
        .then((response) => {
          this.download(response.msg);
        })
        .catch(function () {});
    },
  },
};
</script>
<style lang="less" scoped>
.app-container {
  overflow: auto;
  height: 93vh;
}
.header {
  width: 100%;
  height: 74px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ececec;

  .bread {
    margin-top: 20px;
    margin-left: 5px;
    height: 30px;
    display: flex;
    vertical-align: middle;
    line-height: 30px;

    i {
      font-size: 30px;
      color: #bdbdbd;
    }

    p {
      margin-left: 10px;
      font-size: 16px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #2b2b2b;
    }
  }

  .ipt {
    margin: auto;
    margin-top: 16px;
    width: 350px;
    transform: translateX(-20%);

    /deep/ .el-input__inner {
      border-radius: 4px 0 0 4px;
    }

    .el-button--primary {
      border-radius: 0 4px 4px 0;
    }
  }
}

.chooise {
  margin-top: 20px;

  .sel {
    margin: 0 14px;
  }

  .el-button {
    font-size: 14px;

    /deep/ span {
      margin-left: 5px;
    }
  }
}

.active {
  color: #1172fb !important;
}

.active1 {
  color: #ff8e43 !important;
}

.sel {
  margin-top: 20px;

  span {
    margin-right: 40px;
  }
}

.footer {
  height: 30px;

  .el-pagination {
    margin-top: 10px;
  }

  /deep/ .btn-prev {
    width: 80px;
    height: 40px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #d3dbeb;
  }

  /deep/ .btn-next {
    width: 80px;
    height: 40px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #d3dbeb;
  }

  /deep/ .number {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #8f9bb3;
  }

  /deep/ .btn-quicknext {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #8f9bb3;
  }

  /deep/ .btn-quickprev {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #8f9bb3;
  }

  /deep/ .el-pagination__total {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #2b2b2b;
    line-height: 24px;
    margin-top: 8px;
  }

  /deep/ .el-pagination__jump {
    margin-top: 6px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #2b2b2b;
    line-height: 14px;
  }
}

.batch {
  color: #1267fa;
}

.btn {
  display: flex;
  margin-top: 15px;
}

.basics {
  margin-left: 20px;
  position: relative;
  font-size: 14px;
}

.basics::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1px;
  width: 3px;
  height: 14px;
  background: #1267fa;
}

.basics-infomation {
  display: flex;
  flex-wrap: wrap;
}

.el-form-item {
  margin-left: 20px;
}

.table {
  position: relative;

  .wuhu {
    position: absolute;
    top: 45px;
    right: 0px;
    z-index: 9999;
    background-color: #fff;
    border: 1px solid #ececec;
  }
}

.importInfo {
  /deep/ .el-dialog__body {
    display: flex;
    justify-content: space-around;

    .module {
      width: 40%;
      height: 300px;

      .module-img {
        width: 49px;
        height: 60px;
        margin: 50%;
        transform: translate(-50%, -50%);

        img {
          width: 100%;
          height: 100%;
        }

        .el-button {
          margin-top: 10px;
          transform: translateX(-25%);
        }
      }

      /deep/ .el-dialog__footer {
        text-align: left;
      }

      .module-txt {
        transform: translateY(400%);
        text-align: center;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #1f2e4d;
      }
    }
  }

  .dashed {
    width: 1px;
    height: 180px;
    border-left: 2px dashed rgba(0, 0, 0, 0.1);
    transform: translateY(35%);
  }

  /deep/ .el-upload-list {
    display: none;
  }
}

.ipt-el {
  width: 240px;
}

.scenF {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;

  .scenF-content {
    display: flex;
    margin-left: 10px;
    margin-top: 10px;

    .scenF-detail {
      height: 36px;
      line-height: 36px;
      padding-left: 20px;
      padding-right: 20px;
      border: 1px solid #9aa1af;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #666666;

      .el-icon-circle-close {
        transform: translateY(3px);
      }
    }
  }
}
</style>
